package cn.opopopo.design_pattern_learn.行为型.中介者.demo1;

// 抽象同事类
public abstract class Colleague {
    protected Mediator mediator;
    public String name;
    
    public Colleague(Mediator mediator, String name) {
        this.mediator = mediator;
        this.name = name;
    }
    
    // 发送消息
    public abstract void sendMessage(String message);
    
    // 接收消息
    public abstract void receiveMessage(String message, String from);
}